﻿{template common/header}
<div id="page">
	<div class="wrapper">
		<!--{if !$do}-->
			<section class="column width6 first">
				<div class="colgroup leading">
					<div class="column width3 first">
						<h3>欢迎回来, <a href="#">{$_G['username']}</a></h3>
						<div class="box box-info">{eval $ex = usercount($_G['uid']);}
							您目前的积分情况为:本月已挣取金额<mark>{$ex[tomonthmoney]}</mark>，累计挣取金额<mark>{$ex[extcredits]}</mark>，共领取任务<mark>{$ex[tasks]}</mark>件，其中完成的为<mark>{$ex[tasksed]}</mark>件，主题类任务<mark>{$ex[threads]}</mark>件，回复类任务<mark>{$ex[posts]}</mark>件。
						</div>
						{eval $sub = usersub($_G['uid']);}
							<!--{if empty($sub)}-->
							<div class="box box-warning">
								您尚未绑定任何地宝网账号，请<a href="{URL}?mod=cp&do=binding">点击这里</a>绑定！
							<!--{else}-->
							<div class="box box-info">
								您绑定的账号为
									<!--{loop $sub $k $v}-->
										，<a href="http://i.tiboo.cn/{$v[windid]}" target="_blank">$v[windname]</a>
									<!--{/loop}-->
								<!--{/if}-->
							</div>
					</div>
					<div class="column width3">
						<h4>上次登录：</h4>
						<div class="box">
							时间：{eval echo dgmdate($_G['member']['lastvisit'], 'u')} 于 {$_G['member']['lastip']}
						</div>
					</div>
				</div>
				
				<div class="colgroup leading">
					<div class="column width3 first">
						<h4>最新任务: </h4>
						<hr/>
						<table class="no-style full">
							<tbody>
								<!--{loop $recent[data] $k $v}-->
								<tr>
									<td><a href="{URL}?mod=cp&do=viewtask&taskid={$v[taskid]}">$v[name]</a></td>
									<td class="ta-right">价格：$v[prize]</td>
									<td class="ta-right">{eval echo dgmdate($v[dateline], 'u')}</td>
								</tr>
								<!--{/loop}-->
							</tbody>
						</table>
					</div>
					<div class="column width3">
						<h4>进度提示</h4>
						<hr/>
						<table class="no-style full">
							<tbody>
								<tr>
									<td>Active</td>
									<td class="ta-right">1/5</td>
									<td><div id="progress1" class="progress full progress-green"><span><b></b></span></div></td>
								</tr>
								<tr>
									<td>Pending</td>
									<td class="ta-right">2/5</td>
									<td><div id="progress2" class="progress full progress-blue"><span><b></b></span></div></td>
								</tr>
								<tr>
									<td>Suspended</td>
									<td class="ta-right">2/5</td>
									<td><div id="progress3" class="progress full progress-red"><span><b></b></span></div></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<div class="clear">&nbsp;</div>
			
			</section>
			<aside class="column width2">
				{templatesub sub/help}
			</aside>
		<!--{elseif $do == 'viewtask'}-->
			<section class="column width6 first">
				<div class="colgroup leading" id="tlk{$v[taskid]}" style="margin-top:20px;">
					<div class="width5 column">
						<a href="?mod=cp&do=viewtask&taskid={$v[taskid]}"><b class="big">{$v[name]}</b></a> 发布时间：{eval echo dgmdate($v[dateline], 'u')}<br/>
						<small><b>75kB</b> |  价格: <b>{$v[prize]}</b>角/个 |  人数限额: <b>{$v[tasklimits]}</b> | 已报名：<b>{$v[already]}</b> | 剩余：<b>{$v[sy]}</b></small><br/>
						<!--{if $v['type'] == 2}-->
						帖子地址：<a href="{$v[exid]}"  target="_blank">{$v[exid]}</a>
						<!--{/if}-->
						<q><small>{$v[description]}</small></q><br/>
						<!--{if !in_array($v[taskid], $aped)}-->
						<a href="javascript:;" class="apt" id="task{$v[taskid]}" alt="{$v[type]}">报名</a> 
						<!--{else}-->
						<font color="red">已报名</font>
						<!--{/if}-->
						<!--{if $_G['adminid']}-->
						&middot; <a href="javascript:;" class="det" id="tk{$v[taskid]}" alt="{$v[type]}">删除</a> &middot; <a href="?mod=admin&do=edittask&taskid={$v[taskid]}">编辑</a>
						<!--{/if}-->
					</div>
				</div>
				<div class="clearfix"></div>
			</section>
			<aside class="column width2">
				{templatesub sub/help}
			</aside>
		<!--{elseif $do == 'myext'}-->
			<section class="column width6 first">
					<table class="stylized full">
					<caption><span class="label label-blue">已挣取积分列表</span></caption>
					<thead>
						<tr>
							<th>id</th>
							<th>任务标号</th>
							<th>地址编号</th>
							<th>类型</th>
							<th>件数</th>
							<th>挣取金额</th>
							<th>赚取时间</th>
						</tr>
					</thead>
					<tbody>
						<!--{loop $ext[data] $k $v}-->
							<tr id="tr{$v[mid]}">
								<td>$v[mid]</td>
								<td>$v[taskid]</td>
								<td>$v[lid]</td>
								<td>$v[type]</td>
								<td>$v[passed]</td>
								<td>$v[price]</td>
								<td>{eval echo dgmdate($v[dateline], 'u')}</td>
							</tr>
						<!--{/loop}-->
					</tbody>
					<tfoot>
						<tr>
							<td colspan="10">
								{$page}
							</td>
						</tr>
					</tfoot>
				</table>
			</section>
			<aside class="column width2">
				{templatesub sub/help}
			</aside>
		<!--{elseif $do == 'tasklist'}-->
			<section class="column width6 first">					
				<h3>任务列表</h3>
				<div id="tabs">
					<ul>
						<li><a class="corner-tl" href="#tabs-date">主题任务列表</a></li>
						<li><a class="corner-tr" href="#tabs-abc">帖子任务列表</a></li>
					</ul>
					<div id="tabs-date">
						<div class="colgroup">
							<div class="width3 column first">
								<p>一共有 <b>{$task[total]}</b> 个结果</p>
							</div>
							{$page}
						</div>
						<div class="clearfix"></div>
						<hr />
						
						<!--{loop $task[data] $k $v}-->
							<div class="colgroup leading" id="tlk{$v[taskid]}">
								<div class="width5 column {eval if($v['available'] == 0) echo 'badava';}">
									<a href="?mod=cp&do=viewtask&taskid={$v[taskid]}"><b class="big">{$v[name]}</b></a> 发布时间：{eval echo dgmdate($v[dateline], 'u')}<br/>
									<small><b>75kB</b> |  价格: <b>{$v[prize]}</b>角/个 |  人数限额: <b>{$v[tasklimits]}</b> | 已报名：<b>{$v[already]}</b> | 剩余：<b>{$v[sy]}</b> | 已完成帖子：<b>{$v[posts]}</b></small><br/>
									<q><small>{$v[description]}</small></q><br/>
									<!--{if $v[available]}-->
										<!--{if !in_array($v[taskid], $aped)}-->
										<a href="javascript:;" class="apt" id="task{$v[taskid]}" alt="{$v[type]}">报名</a>&middot; 
										<!--{else}-->
										<font color="red">已报名</font>&middot; 
										<!--{/if}-->
									<!--{/if}-->
									<!--{if $_G['adminid']}-->
									<a href="javascript:;" class="det" id="tk{$v[taskid]}" alt="{$v[type]}">删除</a> &middot; <a href="?mod=admin&do=edittask&taskid={$v[taskid]}">编辑</a>
									<!--{/if}-->
								</div>
							</div>
						<!--{/loop}-->
						<div class="clearfix"></div>
						
						<hr/>
						<div class="colgroup leading">
							<div class="width3 column first">
								<p>一共有 <b>{$task[total]}</b> 个结果</p>
							</div>
							{$page}
						</div>
						<div class="clearfix"></div>
					
					</div>
					<div id="tabs-abc">
						<div class="colgroup">
							<div class="width3 column first">
								<p>一共有 <b>{$taska[total]}</b> 个结果</p>
							</div>
							{$pagea}
						</div>
						<div class="clearfix"></div>
						<hr/>
						<!--{loop $taska[data] $k $v}-->
							<div class="colgroup leading" id="tlk{$v[taskid]}">
								<div class="width5 column {eval if($v['available'] == 0) echo 'badava';}">
									{eval if($v['available'] == 0) echo '<span class="label label-red">（暂不可用）</span>';}<a href="?mod=cp&do=viewtask&taskid={$v[taskid]}"><b class="big">{$v[name]}</b></a> 发布时间：{eval echo dgmdate($v[dateline], 'u')}<br/>
									<small><b>75kB</b> |  价格: <b>{$v[prize]}</b>角/个 |  人数限额: <b>{$v[tasklimits]}</b> | 已报名：<b>{$v[already]}</b> | 剩余：<b>{$v[sy]}</b> | 已完成帖子：<b>{$v[posts]}</b></small><br/>
									<!--{if $v['type'] == 2}-->
									帖子地址：<a href="{$v[exid]}" target="_blank">{$v[exid]}</a>
									<!--{/if}-->
									<q><small>{$v[description]}</small></q><br/>
									<!--{if $v[available]}-->
										<!--{if !in_array($v[taskid], $apeda)}-->
										<a href="javascript:;" class="apt" id="task{$v[taskid]}" alt="{$v[type]}">报名</a>&middot; 
										<!--{else}-->
										<font color="red">已报名</font>&middot; 
										<!--{/if}-->
									<!--{/if}-->
									<!--{if $_G['adminid']}-->
									<a href="javascript:;" class="det" id="tk{$v[taskid]}" alt="{$v[type]}">删除</a> &middot; <a href="?mod=admin&do=edittask&taskid={$v[taskid]}">编辑</a>
									<!--{/if}-->
								</div>
							</div>
						<!--{/loop}-->
						<div class="clearfix"></div>
						<hr />
						<div class="colgroup leading">
							<div class="width3 column first">
								<p>一共有 <b>{$taska[total]}</b> 个结果</p>
							</div>
							{$pagea}
						</div>
						<div class="clearfix"></div>
					</div>
				</div> 

			</section>
			<aside class="column width2">
				{templatesub sub/help}
			</aside>
		<!--{elseif $do == 'myinfo'}-->
		<section class="column width6 first">
		{templatesub sub/pinfo}
		</section>
		<aside class="column width2">
			{templatesub sub/help}
		</aside>
		<!--{elseif $do == 'mythreadtask'}-->
		<section class="column width6 first">
			<table class="stylized full">
				<caption><span class="label label-blue">我的主题任务</span></caption>
				<thead>
					<tr>
						<th>任务ID</th>
						<th>发布时间</th>
						<th>可用</th>
						<th>名称</th>
						<th>描述</th>
						<th>价格</th>
						<th>已完成</th>
						<th>通过</th>
						<th>拒绝</th>
						<th>赚取</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<!--{loop $v[data] $k $v}-->
						<tr id="tr{$v[taskid]}">
							<td>$v[taskid]</td>
							<td>{eval echo dgmdate($v[dateline], 'u')}</td>
							<td>$v[available]</td>
							<td title="{$v[name]}">$v[names]</td>
							<td title="{$v[description]}">$v[descriptions]</td>
							<td>$v[prize]</td>
							<td>$v[posts]</td>
							<td>$v[passed]</td>
							<td>$v[refused]</td>
							<td>{eval echo $v[prize]*$v[passed]}</td>
							<td><a href="?mod=cp&do=postaddress&taskid={$v[taskid]}&type={$v[type]}" class="btn nyroModal">提交地址</a><a href="?mod=cp&do=viewthreadtask&taskid={$v[taskid]}&type={$v[type]}" class="btn nyroModal" id="cd{$v[uid]}">查看列表</a></td>
						</tr>
					<!--{/loop}-->
				</tbody>
				<tfoot>
					<tr>
						<td colspan="10">
							{$page}
						</td>
					</tr>
				</tfoot>
			</table>
		</section>
		<aside class="column width2">
			{templatesub sub/help}
		</aside>
		<!--{elseif $do == 'myposttask'}-->
		<section class="column width6 first">
			<table class="stylized full">
				<caption><span class="label label-blue">我的回帖任务</span></caption>
				<thead>
					<tr>
						<th>任务ID</th>
						<th>发布时间</th>
						<th>结束时间</th>
						<th>可用</th>
						<th>名称</th>
						<th>描述</th>
						<th>限额</th>
						<th>价格</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<!--{loop $v[data] $k $v}-->
						<tr id="tr{$v[taskid]}">
							<td>$v[taskid]</td>
							<td>{eval echo dgmdate($v[dateline], 'u')}</td>
							<td>$v[endtime]</td>
							<td>$v[available]</td>
							<td title="{$v[name]}">$v[names]</td>
							<td title="{$v[description]}">$v[descriptions]</td>
							<td>$v[tasklimits]</td>
							<td>$v[prize]</td>
							<td><a href="?mod=cp&do=viewthreadtask&tid={$v[exid]}&type={$v[type]}" class="btn nyroModal" id="cd{$v[uid]}">查看列表</a></td>
						</tr>
					<!--{/loop}-->
				</tbody>
				<tfoot>
					<tr>
						<td colspan="10">
							{$page}
						</td>
					</tr>
				</tfoot>
			</table>
		</section>
		<aside class="column width2">
			{templatesub sub/help}
		</aside>
		<!--{elseif $do == 'binding'}-->
			<section class="column width6 first">
				<table class="stylized full">
					<caption><span class="label label-blue">我的绑定账号</span></caption>
					<thead>
						<tr>
							<th>账号id</th>
							<th>账号名称</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
						<!--{loop $v[data] $k $v}-->
							<tr id="tr{$v[windid]}">
								<td>$v[windid]</td>
								<td>$v[windname]</td>
								<td><a href="javascript:;" class="btn bddel" id="bd{$v[windid]}">删除</a></td>
							</tr>
						<!--{/loop}-->
					</tbody>
					<tfoot>
						<tr>
							<td colspan="10">
								{$page}
							</td>
						</tr>
					</tfoot>
				</table>
			</section>
			<aside class="column width2">
				<p><a href="?mod=cp&do=postbinding" class="btn btn-special btn-green nyroModal"><img SRC="template/default/images/page_white_go.png" class="icon" alt=""/>绑定新账号</a></p>
				{templatesub sub/help}
			</aside>
		<!--{/if}-->
	</div>
{template common/footer}